package com.example.myproject.util.createcompany;

import com.alibaba.fastjson.JSON;
import com.example.myproject.util.DateUtil;
import com.example.myproject.util.JsonUtil;

import java.text.ParseException;

public class TestCompanyUtil {
    public static void main(String[] param){
        CreateCompanyDTO createCompanyDTO  = new CreateCompanyDTO();
        createCompanyDTO.setCompanyCity("上海");
        createCompanyDTO.setCompanyName("测试实收自动化");
        createCompanyDTO.setCompanyProvince("测试");
        createCompanyDTO.setPortCount(2);
        try {
            createCompanyDTO.setEndTime(DateUtil.convertStringToDate(DateUtil.YYYY_MM_DD,"2019-01-20"));
        } catch (ParseException e) {
            e.printStackTrace();
        }
        createCompanyDTO.setCompanyUsage("OFFICIAL");
        createCompanyDTO.setStatus("OFFICIAL");
        createCompanyDTO.setSaaSVersionEnum("标准版");
        createCompanyDTO.setMigrationType("有");
        createCompanyDTO.setAllianceName("无");
        String json = JSON.toJSONString(createCompanyDTO);
        System.out.println("extra:"+JSON.toJSONString(json));

        QlApiBaseDTO apiBaseDTO = new QlApiBaseDTO();
        apiBaseDTO.setCustomerId("132323");
        apiBaseDTO.setExtra(json);
        apiBaseDTO.setOrderNo("02");
        apiBaseDTO.setProductNo("04");
        apiBaseDTO.setImplementDetailId("06");
        //System.out.println("json:"+JSON.toJSONString(apiBaseDTO));
    }
}
